package com.xxkj.drugtraceability.ui.departhd

import com.xxkj.drugtraceability.base.BaseRepository
import com.xxkj.drugtraceability.bean.*
import com.xxkj.drugtraceability.net.Result
import com.xxkj.drugtraceability.net.WanService

/**
 * author: zhoujingjin
 * created on: 2024/9/10 16:15
 * description:
 */
class DepartDrugHdCollectionRepository(val wanService: WanService):BaseRepository() {
    /*
    * 病区加token
    */
    suspend fun queryPrescriptionInfoList( prescriptioninfo:String): Result<BaseData<DepartDrug>> {
        return safeApiCall { executeResponse(wanService.getCheckDrugInfoList(prescriptioninfo)) }
    }
    /**
     * 保存
     */
    suspend fun finishScanDrugCode( prescriptioninfo:String): Result<BaseData<SucResult>> {
        return safeApiCall { executeResponse(wanService.checkDrugInfo(prescriptioninfo)) }
    }
}